
<form name="editForm" role="form" novalidate ng-submit="vm.save()" show-validation>

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                ng-click="vm.clear()">&times;</button>
        <h4 class="modal-title" id="myOpinionLabel">Create or edit a Opinion</h4>
    </div>
    <div class="modal-body">
        <jhi-alert-error></jhi-alert-error>
        <div class="form-group" ng-show="vm.opinion.id">
            <label for="id">ID</label>
            <input type="text" class="form-control" id="id" name="id"
                    ng-model="vm.opinion.id" readonly />
        </div>
        <div class="form-group">
            <label class="control-label" for="field_userId">User Id</label>
            <input type="number" class="form-control" name="userId" id="field_userId"
                    ng-model="vm.opinion.userId"
                    required />
            <div ng-show="editForm.userId.$invalid">
                <p class="help-block"
                    ng-show="editForm.userId.$error.required">
                    This field is required.
                </p>
                <p class="help-block"
                    ng-show="editForm.userId.$error.number">
                    This field should be a number.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" for="field_opinionContent">Opinion Content</label>
            <input type="text" class="form-control" name="opinionContent" id="field_opinionContent"
                    ng-model="vm.opinion.opinionContent"
                    required />
            <div ng-show="editForm.opinionContent.$invalid">
                <p class="help-block"
                    ng-show="editForm.opinionContent.$error.required">
                    This field is required.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" for="field_updateTime">Update Time</label>
                <div class="input-group">
                    <input id="field_updateTime" type="text" class="form-control" name="updateTime" datetime-picker="{{dateformat}}" ng-model="vm.opinion.updateTime" is-open="vm.datePickerOpenStatus.updateTime"
                    required  />
                    <span class="input-group-btn">
                        <button type="button" class="btn btn-default" ng-click="vm.openCalendar('updateTime')"><i class="glyphicon glyphicon-calendar"></i></button>
                    </span>
                </div>
            <div ng-show="editForm.updateTime.$invalid">
                <p class="help-block"
                    ng-show="editForm.updateTime.$error.required">
                    This field is required.
                </p>
                <p class="help-block"
                    ng-show="editForm.updateTime.$error.ZonedDateTimelocal">
                    This field should be a date and time.
                </p>
            </div>
        </div>

    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="vm.clear()">
            <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span>Cancel</span>
        </button>
        <button type="submit" ng-disabled="editForm.$invalid || isSaving" class="btn btn-primary">
            <span class="glyphicon glyphicon-save"></span>&nbsp;<span>Save</span>
        </button>
    </div>
</form>
